const pxtorem = require('postcss-pxtorem')
const autoprefixer = require('autoprefixer')

module.exports = {
  publicPath: '/',
  productionSourceMap: false,
  devServer: {
    proxy: {
      '/api': {
        target: 'http://223.72.187.36:3003',
        pathRewrite: { 
          '^/api': '' 
        }
      }
    }
  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          autoprefixer(),
          pxtorem({
            rootValue: 192,
            propList: ['*'],
            selectorBlackList: ['yl'],
          })
        ]
      },
      less: {
        globalVars: {
          hack: `true; @import '~@/styles/custom.less';`
        }
      }
    }
  },
}